gen sector=.
replace sector=1 if product==1 | product==2 | product==5 // Agriculture, hunting, forestry and fishing
replace sector=2 if product==10 | product==11 | product==12 | product==13 | product==14 | product==15 // Mining and quarrying
replace sector=3 if product==15 | product==16 // Food products, beverages and tobacco
replace sector=4 if product==17 | product==18 | product==19 // Textiles, textile products, leather and footwear
replace sector=5 if product==20 // Wood and products of wood and cork
replace sector=6 if product==21 | product==22 // Pulp, paper, paper products, printing and publishing

replace sector=7 if product==23 // Coke, refined petroleum products and nuclear fuel
replace sector=8 if product==24 // Chemicals and chemical products
replace sector=9 if product==25 // Rubber and plastics products
replace sector=10 if product==26 // Other non-metallic mineral products
replace sector=11 if product==27 // Basic metals
replace sector=12 if product==28 // Fabricated metal products
replace sector=13 if product==29 // Machinery and equipment, nec
replace sector=14 if product==30 | product==32 | product==33 // Computer, Electronic and optical equipment

replace sector=15 if product==31 // Electrical machinery and apparatus, nec
replace sector=16 if product==34 // Motor vehicles, trailers and semi-trailers
replace sector=17 if product==35 // Other transport equipment
replace sector=18 if product==36 // Manufacturing nec; recycling
replace sector=19 if product==40 // Electricity, gas and water supply

// Sectors 3 to 18 correspond to Manufacturing.

